﻿// Original author contact info: Owen Emlen (owene_1998@yahoo.com)
// Note: other individuals may also have contributed to this code
// Project hosted on CodePlex.com as of 1/10/2009 at http://wpfimageviewer.codeplex.com
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.IO;
using System.Windows.Threading;
using System.Collections.Specialized;
using DirectoryViewModels;
using System.Threading;
using BrainTechLLC.FileMaintenance;
using BrainTechLLC.WPF;
using DragDropLibrary;

using System.ComponentModel;
using BrainTechLLC.ThreadSafeObjects;
using System.Diagnostics;

namespace BrainTechLLC.FolderExplorer
{
    public partial class FolderExplorerControl : UserControl
    {
        private int FindIndex(FolderViewModel folder, Dictionary<FolderViewModel, int> lookup)
        {
            if (folder == null)
            {
                return -1;
            }

            int val;
            if (lookup.TryGetValue(folder, out val))
            {
                return val;
            }

            return -1;
        }

        private int FindIndex(FolderViewModel folder)
        {
            if (folder == null)
            {
                return -1;
            }

            return _TreeViewItems.FindIndex(tvi => (tvi.Tag as FolderViewModel) == folder);
        }

    }
}
